<?php
//售货中状态
class Sold implements State {
    private $game;
    public function __construct(Game $game)
    {
        $this->game = $game;
    }
    public function insertMoney($money){
        echo "投入失败，正在售出糖果中，请稍等";
    }
    public function turn() {
        echo "正在售出糖果中，请稍等";
    }
    public function get() {
        echo "获取糖果完毕";
        $this->game->setState($this->game->getSoldOutState());
    }
    public function reject(){
        echo "正在售出糖果中，请稍等";
    }
}